Variable Reference

Variable Reference Guide

In workflow configurations (such as system prompts, tool parameters, conditional logic, etc.), you can use placeholders in the format {{namespace.key}} or {{key}} to dynamically reference runtime data.

Core Namespaces

NamespaceDescriptionExample
sys (or system)System-level variables, such as query content, session ID, time, etc.{{sys.query}}, {{sys.now}}
var (or variable)Custom flow variables, usually generated by nodes or set manually.{{var.orderId}}
nodeReferences the output result of a specific node.{{node.node_123}}
customerCustomer information associated with the current session.{{customer.name}}
entityEntities extracted by intent recognition or extraction nodes.{{entity.product}}
eventData carried when the workflow is triggered by a webhook or external event.{{event.order_id}}
metaSession Metadata.{{meta.vip_level}}
agentAgent-specific variables.{{agent.sysPrompt}}

Variable Details

1. System Variables (sys / system)

Variable NameAliasDescription
queryinput, usermessageThe user's current input message.
lastOutputpreviousOutputThe output result of the previous execution node.
intent-The currently identified user intent.
intentConfidence-Confidence score of intent recognition (0.00 - 1.00).
sessionId-Current Session ID.
customerId-Current Customer ID.
nowdate, currentDateCurrent date (yyyy-MM-dd).
nowTime-Current time (yyyy-MM-dd HH:mm).
finalReply-The final generated reply content.
needHumanTransfer-Whether marked for transfer to human agent (true/false).
humanTransferReason-Reason for transfer to human agent.

2. Node Output (node)

References the execution result of a specific node.

  • Syntax: {{node.NODE_ID}}
  • Example: {{node.llm_generation_1}}
  • Note: NODE_ID is the unique ID generated when you configure the node on the canvas.

3. Customer Info (customer)

References detailed information about the current chat customer.

  • Syntax: {{customer.FIELD_NAME}}
  • Common Fields:
    • {{customer.name}}
    • {{customer.email}}
    • {{customer.phone}}
    • {{customer.id}}

4. Entity (entity)

References key entities extracted from user input.

  • Syntax: {{entity.ENTITY_NAME}}
  • Example: If intent recognition extracted productName, use {{entity.productName}}.

5. Event Data (event)

References data in the event payload when the workflow is triggered by an external event (e.g., Shopify Webhook).

  • Syntax: {{event.JSON_FIELD}}
  • Example: {{event.order_id}}, {{event.total_price}}

6. Shorthand Mode (No Namespace)

If the namespace is omitted (e.g., using {{key}} directly), the system will automatically search for variables in the following priority order:

  1. Local Variables
  2. System Variables (sys)
  3. Custom Variables (var)
  4. Entities (entity)
  5. Customer Info (customer)
  6. Node Output (node)

Recommendation: To avoid ambiguity, it is recommended to use the full notation with namespaces (e.g., {{sys.query}}) whenever possible.